if("${fld:tuid}" == ""){//新增
	//正房、小房
	var zfArea1 = 0;
	var zfPrice1 = 0;
	var zfTotal1 = 0;
	var zfArea2 = 0;
	var zfPrice2 = 0;
	var zfTotal2 = 0;

	var xfArea1 = 0;
	var xfPrice1 = 0;
	var xfTotal1 = 0;

	if("${fld:zf_level1}" == "正房一等"){
		zfArea1 = parseFloatExtend("${fld:zf_area1@########0.00}");
		zfPrice1 = parseFloatExtend("${fld:zf_price1@########0.00}");
		zfTotal1 = parseFloatExtend("${fld:zf_total1@########0.00}");
	}else if("${fld:zf_level1}" == "正房二等"){
		zfArea2 = parseFloatExtend("${fld:zf_area1@########0.00}");
		zfPrice2 = parseFloatExtend("${fld:zf_price1@########0.00}");
		zfTotal2 = parseFloatExtend("${fld:zf_total1@########0.00}");
	}

	if("${fld:zf_level2}" == "正房一等"){
		zfArea1 += parseFloatExtend("${fld:zf_area2@########0.00}");
		zfPrice1 = parseFloatExtend("${fld:zf_price2@########0.00}");
		zfTotal1 += parseFloatExtend("${fld:zf_total2@########0.00}");
	}else if("${fld:zf_level1}" == "正房二等"){
		zfArea2 += parseFloatExtend("${fld:zf_area2@########0.00}");
		zfPrice2 = parseFloatExtend("${fld:zf_price2@########0.00}");
		zfTotal2 += parseFloatExtend("${fld:zf_total2@########0.00}");
	}

	if(zfTotal1 > 0){
		document.formEditor.zf_area1.value = parseFloatExtend(zfArea1);
		document.formEditor.zf_level1.value = "正房一等";
		document.formEditor.zf_price1.value = zfPrice1;
		document.formEditor.zf_total1.value = parseFloatExtend(zfTotal1);
	}
	if(zfTotal2 > 0){
		document.formEditor.zf_area2.value = parseFloatExtend(zfArea2);
		document.formEditor.zf_level2.value = "正房二等";
		document.formEditor.zf_price2.value = zfPrice2;
		document.formEditor.zf_total2.value = parseFloatExtend(zfTotal2);
	}

	if("${fld:xf_level1}" == "小房一等"){
		xfArea1 += parseFloatExtend("${fld:xf_area1@########0.00}");
		xfPrice1 = parseFloatExtend("${fld:xf_price1@########0.00}");
		xfTotal1 += parseFloatExtend("${fld:xf_total1@########0.00}");
	}
	if("${fld:xf_level2}" == "小房一等"){
		xfArea1 += parseFloatExtend("${fld:xf_area2@########0.00}");
		xfPrice1 = parseFloatExtend("${fld:xf_price2@########0.00}");
		xfTotal1 += parseFloatExtend("${fld:xf_total2@########0.00}");
	}
	if("${fld:xf_level3}" == "小房一等"){
		xfArea1 += parseFloatExtend("${fld:xf_area3@########0.00}");
		xfPrice1 = parseFloatExtend("${fld:xf_price3@########0.00}");
		xfTotal1 += parseFloatExtend("${fld:xf_total3@########0.00}");
	}
	if("${fld:xf_level4}" == "小房一等"){
		xfArea1 += parseFloatExtend("${fld:xf_area4@########0.00}");
		xfPrice1 = parseFloatExtend("${fld:xf_price4@########0.00}");
		xfTotal1 += parseFloatExtend("${fld:xf_total4@########0.00}");
	}
	if("${fld:xf_level5}" == "小房一等"){
		xfArea1 += parseFloatExtend("${fld:xf_area5@########0.00}");
		xfPrice1 = parseFloatExtend("${fld:xf_price5@########0.00}");
		xfTotal1 += parseFloatExtend("${fld:xf_total5@########0.00}");
	}
	if("${fld:xf_level6}" == "小房一等"){
		xfArea1 += parseFloatExtend("${fld:xf_area6@########0.00}");
		xfPrice1 = parseFloatExtend("${fld:xf_price6@########0.00}");
		xfTotal1 += parseFloatExtend("${fld:xf_total6@########0.00}");
	}

	if(xfTotal1 > 0){
		document.formEditor.xf_area1.value = parseFloatExtend(xfArea1);
		document.formEditor.xf_level1.value = "小房一等";
		document.formEditor.xf_price1.value = xfPrice1;
		document.formEditor.xf_total1.value = parseFloatExtend(xfTotal1);
	}
}else{
	document.formEditor.zf_area1.value = "${fld:zf_area1_s@########0.00}";
	document.formEditor.zf_level1.value = "正房一等";
	document.formEditor.zf_price1.value = "${fld:zf_price1_s@########0.00}";
	document.formEditor.zf_total1.value = "${fld:zf_total1_s@########0.00}";
	
	document.formEditor.zf_area2.value = "${fld:zf_area2_s@########0.00}";
	document.formEditor.zf_level2.value = "正房二等";
	document.formEditor.zf_price2.value = "${fld:zf_price2_s@########0.00}";
	document.formEditor.zf_total2.value = "${fld:zf_total2_s@########0.00}";

	document.formEditor.xf_area1.value = "${fld:xf_area1_s@########0.00}";
	document.formEditor.xf_level1.value = "小房一等";
	document.formEditor.xf_price1.value = "${fld:xf_price1_s@########0.00}";
	document.formEditor.xf_total1.value = "${fld:xf_total1_s@########0.00}";
}


document.formEditor.zengjia_per.value = "${fld:zengjia_per}";
document.formEditor.jianshao_per.value = "${fld:jianshao_per}";
document.formEditor.zengjia_fee.value = "${fld:zengjia_fee@########0.00}";
document.formEditor.jianshao_fee.value = "${fld:jianshao_fee@########0.00}";


document.formEditor.duiding_area_z1.value = "${fld:duiding_area_z1@########0.00}";
document.formEditor.duiding_area_z2.value = "${fld:duiding_area_z2@########0.00}";
document.formEditor.duiding_area_x1.value = "${fld:duiding_area_x1@########0.00}";
document.formEditor.yuannei_total_fee.value = "${fld:yuannei_total_fee@########0.00}";
document.formEditor.oldhouse_total_fee.value = "${fld:oldhouse_total_fee@########0.00}";
document.formEditor.jianzhu_area.value = "${fld:jianzhu_area@########0.00}";
document.formEditor.jiesuan_area.value = "${fld:jiesuan_area@########0.00}";

document.formEditor.duiding_area.value = "${fld:duiding_area@########0.00}";
document.formEditor.yingfen_area.value = "${fld:yingfen_area@########0.00}";
document.formEditor.yingfen_price.value = "${fld:yingfen_price@########0.00}";
document.formEditor.yingfen_fee.value = "${fld:yingfen_fee@########0.00}";
document.formEditor.zengdang_area.value = "${fld:zengdang_area@########0.00}";
document.formEditor.zengdang_price.value = "${fld:zengdang_price@########0.00}";
document.formEditor.zengdang_fee.value = "${fld:zengdang_fee@########0.00}";
document.formEditor.chaodang_area.value = "${fld:chaodang_area@########0.00}";
document.formEditor.chaodang_price.value = "${fld:chaodang_price@########0.00}";
document.formEditor.chaodang_fee.value = "${fld:chaodang_fee@########0.00}";
document.formEditor.other_name.value = "${fld:other_name@js}";
document.formEditor.other_area.value = "${fld:other_area@########0.00}";
document.formEditor.other_price.value = "${fld:other_price@########0.00}";
document.formEditor.other_fee.value = "${fld:other_fee@########0.00}";
document.formEditor.newhouse_total_fee.value = "${fld:newhouse_total_fee@########0.00}";
document.formEditor.other_cost_name.value = "${fld:other_cost_name@js}";
document.formEditor.other_cost_fee.value = "${fld:other_cost_fee@########0.00}";

setCheckboxValue('enouph_flag','${fld:enouph_flag}','formEditor');

document.formEditor.jiesuan_fee.value = "${fld:jiesuan_fee@########0.00}";
document.formEditor.jiesuan_daxie_wan.value = "${fld:jiesuan_daxie_wan@js}";
document.formEditor.jiesuan_daxie_qian.value = "${fld:jiesuan_daxie_qian@js}";
document.formEditor.jiesuan_daxie_bai.value = "${fld:jiesuan_daxie_bai@js}";
document.formEditor.jiesuan_daxie_shi.value = "${fld:jiesuan_daxie_shi@js}";
document.formEditor.jiesuan_daxie_yuan.value = "${fld:jiesuan_daxie_yuan@js}";
document.formEditor.jiesuan_daxie_jiao.value = "${fld:jiesuan_daxie_jiao@js}";
document.formEditor.jiesuan_daxie_fen.value = "${fld:jiesuan_daxie_fen@js}";
document.formEditor.remark.value = "${fld:remark@js}";

document.formEditor.create_date.value = "${fld:create_date@yyyy-MM-dd}";

document.formEditor.tuid.value = "${fld:tuid}";




//目前先按照一套房算
if("${fld:tuid}" == ""){//新增
	//院内设施
	document.formEditor.yuannei_total_fee.value = "${fld:total_fee@########0.00}";
	//费用发放数据
	if("${fld:fee_status}" == "0"){
		var str_fee = "";
		if("${fld:banjia_fee@########0.00}" != ""){
			str_fee += "搬${fld:banjia_fee@########0.00}、";
		}
		if("${fld:suqian_fee@########0.00}" != ""){
			str_fee += "速${fld:suqian_fee@########0.00}、";
		}
		if("${fld:touqin_fee@########0.00}" != ""){
			str_fee += "投${fld:touqin_fee@########0.00}、";
		}
		if("${fld:other_fee_f@########0.00}" != ""){
			str_fee += "其它${fld:other_fee_f@########0.00}";
		}
		if(str_fee.lastIndexOf("、") == (str_fee.length-1)){
			str_fee = str_fee.substring(0,str_fee.length-1);
		}
		document.formEditor.other_cost_name.value = str_fee;
		document.formEditor.other_cost_fee.value = "${fld:feiyongfafang@########0.00}";

		if("${fld:begin_date@yyyy-MM-dd}" != "" && "${fld:end_date@yyyy-MM-dd}" != ""){
			document.formEditor.remark.value = "投亲费：${fld:begin_date@yyyy-MM-dd}到${fld:end_date@yyyy-MM-dd}（${fld:month_count_real@########0.0}个月）";
		}
	}
		
}else{//修改
	//手动调整修改
	//2010-6-13 结算审核的才显示‘打印’按钮(t_house.house_status = '6')
	document.getElementById("printBtn").style.display = "${fld:house_status_desc}";
	//2010-6-13
}
//全手工录入
inputAllByHand();